﻿set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
    list(APPEND CMAKE_PREFIX_PATH "D:\\WorkEnv\\Qt\\5.15.2\\msvc2019_64")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
        list(APPEND CMAKE_PREFIX_PATH "/home/jetson/Qt/6.7.0/gcc_arm64")
    else()

    endif()
endif()

find_package(QT NAMES Qt6 Qt5)
if(QT_FOUND)
    find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)

    add_executable(DeviceFindToolClient WIN32
        client_gui.ui
        client_gui.hpp
        client_gui.cpp
        app.qrc
        app.rc

        main.cpp
    )


    target_link_libraries(DeviceFindToolClient
        common
        Qt${QT_VERSION_MAJOR}::Widgets
    )

    set_target_properties(DeviceFindToolClient PROPERTIES
        RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/DeviceFindTool
    )
endif()
